//
//  AttentionViewController.m
//  KeleAppProject
//
//  Created by Cen Zhou on 2018/1/16.
//  Copyright © 2018年 Cen Zhou. All rights reserved.
//

#import "AttentionViewController.h"
#import "AttentionVC.h"
#import "FanceVC.h"

@interface AttentionViewController ()<UIScrollViewDelegate>

@property (nonatomic, strong) NSArray *titleArray;
@property (nonatomic, strong) NSArray *controlerArray;


@end

@implementation AttentionViewController


- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self configureNavTitleViewWithDataSource:self.titleArray width:32 distance:61 notificationName:@"AttentScrollToIndex"];
    [self addChildControllersWithArray:self.controlerArray];
    [self loadSubviewsOnHomeWithScrollHeight:KLScreenH-NaviH y:0 titleArr:self.titleArray];
}


- (NSArray *)titleArray
{
    if (!_titleArray) {
        _titleArray = [NSArray arrayWithObjects:@"关注",@"粉丝", nil];
    }
    return _titleArray;
}

- (NSArray *)controlerArray{
    if (!_controlerArray) {
        _controlerArray = [NSArray arrayWithObjects:@"AttentionVC",@"FanceVC", nil];
    }
    return _controlerArray;
}


- (void)dealloc {
    NSLog(@"AttentionViewController控制器被销毁了");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
